home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / change / aboutbox.frm next >
Text File  |  1995-09-06  |  4KB  |  126 lines

  1. VERSION 2.00
  2. Begin Form AboutBox 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "About The Desktop Changer"
  5.    ClientHeight    =   2910
  6.    ClientLeft      =   2415
  7.    ClientTop       =   2145
  8.    ClientWidth     =   6180
  9.    Height          =   3315
  10.    Icon            =   ABOUTBOX.FRX:0000
  11.    Left            =   2355
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   2910
  17.    ScaleWidth      =   6180
  18.    Top             =   1800
  19.    Width           =   6300
  20.    Begin PictureBox Picture2 
  21.       AutoSize        =   -1  'True
  22.       BorderStyle     =   0  'None
  23.       Height          =   480
  24.       Left            =   390
  25.       Picture         =   ABOUTBOX.FRX:0302
  26.       ScaleHeight     =   480
  27.       ScaleWidth      =   480
  28.       TabIndex        =   2
  29.       Top             =   240
  30.       Width           =   480
  31.    End
  32.    Begin Label Label2 
  33.       Height          =   885
  34.       Left            =   1365
  35.       TabIndex        =   0
  36.       Top             =   1995
  37.       Width           =   4335
  38.    End
  39.    Begin Label Label3 
  40.       BackColor       =   &H00000000&
  41.       Caption         =   "Label3"
  42.       Height          =   30
  43.       Left            =   1365
  44.       TabIndex        =   1
  45.       Top             =   1890
  46.       Width           =   4365
  47.    End
  48.    Begin Label Label1 
  49.       Height          =   1695
  50.       Left            =   1365
  51.       TabIndex        =   3
  52.       Top             =   165
  53.       Width           =   3735
  54.    End
  55. End
  56. DefInt A-Z
  57. Declare Function GetFreeSpace& Lib "Kernel" (ByVal wFlags)
  58. Declare Function GetWinFlags& Lib "Kernel" ()
  59. Const WF_STANDARD = &H10
  60. Const WF_ENHANCED = &H20
  61. Declare Function GetSystemMenu Lib "User" (ByVal hWnd, ByVal bRevert)
  62. Declare Function DeleteMenu Lib "User" (ByVal hMenu, ByVal nPosition, ByVal wFlags)
  63.  
  64. Sub Command1_Click ()
  65.     Unload AboutBox
  66.     
  67. End Sub
  68.  
  69. Sub Form_Load ()
  70.     Const MF_BYPOSITION = &H400
  71.     CRLF$ = Chr$(13) + Chr$(10)
  72.     AboutBox.Top = ((screen.Height * .79) / 2) - (AboutBox.Height / 2)
  73.     AboutBox.Left = (screen.Width / 2) - (AboutBox.Width / 2)
  74.     hSysMenu = GetSystemMenu(hWnd, 0)
  75.     x% = DeleteMenu(hSysMenu, 9, MF_BYPOSITION)
  76.     x% = DeleteMenu(hSysMenu, 8, MF_BYPOSITION)
  77.     x% = DeleteMenu(hSysMenu, 7, MF_BYPOSITION)
  78.     x% = DeleteMenu(hSysMenu, 5, MF_BYPOSITION)
  79.     label1.Caption = CRLF$ + "Changer In Visual Basic" + CRLF$ + CRLF$
  80.     label1.Caption = label1.Caption + "By B.Biney" + CRLF$
  81.     label1.Caption = label1.Caption + CRLF$ + "This product is licensed to:" + CRLF$
  82.     label1.Caption = label1.Caption + CRLF$ + "(Unlicensed)"
  83.     a% = Mode()
  84.     Select Case a%
  85.         Case 32
  86.         g$ = "386 Enhanced Mode"
  87.         Case 16
  88.         g$ = "Standard Mode"
  89.     End Select
  90.     If MathChip() Then
  91.     z$ = "Present"
  92.     Else
  93.     z$ = "Absent"
  94.     End If
  95.     Label2.Caption = g$ + CRLF$
  96.     Label2.Caption = Label2.Caption + "Memory:" + Space$(27) + Format$(FreeMem&() \ 1024) + "KB Free" + CRLF$
  97.     Label2.Caption = Label2.Caption + "Math Co-processor:" + Space$(11) + z$ + CRLF$
  98. End Sub
  99.  
  100. Function FreeMem& ()
  101.     FreeMem& = GetFreeSpace(0)
  102. End Function
  103.  
  104. Function MathChip ()
  105.     Flags& = GetWinFlags()
  106.     If Flags& And WF_8087 Then
  107.         MathChip = True
  108.     Else
  109.         MathChip = False
  110.     End If
  111. End Function
  112.  
  113. Function Mode ()
  114.     Flags& = GetWinFlags()
  115.     If Flags& And WF_ENHANCED Then
  116.         Mode = WF_ENHANCED
  117.     Else
  118.         Mode = WF_STANDARD
  119.     End If
  120. End Function
  121.  
  122. Sub Picture2_DblClick ()
  123.     MsgBox "By The Boss !", 64, "Ha Ha Ha!"
  124. End Sub
  125.  
  126.